var dungeon = argument0;
var pathGraph = argument1;
var roomGraph = argument2;
var height = array_height_2d(pathGraph);
var width = array_length_2d(pathGraph, 0)


//shitty way
for(var i = 0; i < height; i++)
{
    for (var j = 0; j < width; j++)
    {
        if ((is_string( pathGraph[i, j] ) || pathGraph[i, j] != 0) && !roomGraph[i, j])
        {
            var tile = 0;
            tile = instance_create(0, 0, obj_Tile);
            setTile(j, i, tile, dungeon);
            tile.sprite_index = spr_Sand_Floor;
        }
    }
}